package com.autotest0113;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvFileSource;
import org.junit.jupiter.params.provider.MethodSource;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.edge.EdgeOptions;

public class FirstAutotest {
    public void dilirebaTest() throws InterruptedException {
        EdgeOptions options = new EdgeOptions();
        options.addArguments("--remote-allow-origins=*");
        EdgeDriver driver = new EdgeDriver(options);
        Thread.sleep(3000);
        driver.get("https://www.baidu.com");
        Thread.sleep(3000);
        driver.findElement(By.cssSelector("#kw")).sendKeys("迪丽热巴");
        Thread.sleep(3000);
        driver.findElement(By.cssSelector("#su")).click();
        Thread.sleep(3000);
        driver.quit();
    }
    @ParameterizedTest
    @CsvFileSource(files = "D:\\bbb.csv")
    void a(String name, int age){
        System.out.println("name:" + name +",age:" + age);
    }
   
}
